package br.uneb.tebd;

import java.util.List;

import br.uneb.tebd.model.Guitar;
import br.uneb.tebd.model.GuitarRepository;
import android.app.ListActivity;
import android.os.Bundle;

public class ListGuitar extends ListActivity {
	
	private GuitarRepository guitarRepository;
	private List<Guitar> guitars;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		this.guitarRepository = new GuitarRepository(this);
		
		this.guitars = this.guitarRepository.listGuitars();
		
		this.setListAdapter(new GuitarListAdapter(this, guitars));
		
	}
}
